import request from '@/utils/request';
export const getAllChannelsAPI = () => {
  return request({ url: '/v1_0/channels' });
};
export const getUserChannelsAPI = () => {
  return request({ url: '/v1_0/user/channels' });
};
export const delChannelByIdAPI = (id: number) => {
  return request({ url: '/v1_0/user/channels/' + id, method: 'delete' });
};

export const addChannelAPI = (id: number) => {
  return request({
    url: '/v1_0/user/channels',
    method: 'patch',
    data: {
      channels: [{ id: id }],
    },
  });
};
